import Vue from 'vue'
import App from './App.vue'
import router from './router'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import '@/styles/index.scss' // global css
import './icons' // icon
import i18n from './lang' // Internationalization
import store from './store'
import dashboard from '@/module-dashboard/' // 面板
import base from '@/module-manage/' // 用户管理
import hmmm from '@/module-hmmm/' // 黑马面面
import * as filters from './filters' // global filters
Vue.use(dashboard, store)
Vue.use(base, store)
Vue.use(hmmm, store)
Vue.config.productionTip = false
    // 饿了么
Vue.use(Element, {
    size: 'medium', // set element-ui default size
    i18n: (key, value) => i18n.t(key, value)
})

// 过滤器
Object.keys(filters).forEach(key => {
    Vue.filter(key, filters[key])
})

new Vue({
    router,
    i18n,
    store,
    render: h => h(App)
}).$mount('#app')